<?php
require(dirname(__FILE__)."/"."../inc/common.inc.php");
admin(9);
function systemMsg(){
	global $db,$siteurl,$onlineip,$SCRIPT_FILENAME,$WEBURL;
	if($db->version()<'4.1'){
		$rs['mysqlVersion']=$db->version()."(低版本);";
	}else{
		$rs['mysqlVersion']=$db->version()."(高版本);";
	}
	isset($_COOKIE) ? $rs['ifcookie']="SUCCESS" : $rs['ifcookie']="FAIL";
	$rs['sysversion']=PHP_VERSION;	//PHP版本
	$rs['max_upload']= ini_get('upload_max_filesize') ? ini_get('upload_max_filesize') : 'Disabled';	//最大上传限制
	$rs['max_ex_time']=ini_get('max_execution_time').' 秒';	//最大执行时间
	$rs['sys_mail']= ini_get('sendmail_path') ? 'Unix Sendmail ( Path: '.ini_get('sendmail_path').')' :( ini_get('SMTP') ? 'SMTP ( Server: '.ini_get('SMTP').')': 'Disabled' );	//邮件支持模式
	$rs['systemtime']=date("Y-m-j g:i A");	//服务器所在时间
	$rs['onlineip']=$onlineip;				//当前IP
	if( function_exists("imagealphablending") && function_exists("imagecreatefromjpeg") && function_exists("ImageJpeg") ){
		$rs['gdpic']="支持";
	}else{
		$rs['gdpic']="不支持";
	}
	$rs['allow_url_fopen']=ini_get('allow_url_fopen')?"On 支持采集数据":"OFF 不支持采集数据";
	$rs['safe_mode']=ini_get('safe_mode')?"打开":"关闭";
	$rs['DOCUMENT_ROOT']=$_SERVER["DOCUMENT_ROOT"];	//程序所在磁盘物理位置
	$rs['SERVER_ADDR']=$_SERVER["SERVER_ADDR"]?$_SERVER["SERVER_ADDR"]:$_SERVER["LOCAL_ADDR"];		//服务器IP
	$rs['SERVER_PORT']=$_SERVER["SERVER_PORT"];		//服务器端口
	$rs['SERVER_SOFTWARE']=$_SERVER["SERVER_SOFTWARE"];	//服务器软件
	$rs['SCRIPT_FILENAME']=$_SERVER["SCRIPT_FILENAME"];	//当前文件路径
	$rs['SERVER_NAME']=$_SERVER["SERVER_NAME"];	//域名

	//获取ZEND的版本
	ob_end_clean();
	ob_start();
	phpinfo();
	$phpinfo=ob_get_contents();
	ob_end_clean();
	ob_start();
	preg_match("/with(&nbsp;| )Zend(&nbsp;| )Optimizer(&nbsp;| )([^,]+),/is",$phpinfo,$zenddb);
	$rs['zendVersion']=$zenddb[4]?$zenddb[4]:"未知/可能没安装";
	
	return $rs;
}
$systemMsg=systemMsg();
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="js/html5.js"></script>
<script type="text/javascript" src="js/respond.min.js"></script>
<script type="text/javascript" src="js/PIE_IE678.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="font/font-awesome.min.css"/>
<!--[if IE 7]>
<link href="font/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<title>系统日志</title>
</head>
<body>
<nav class="Hui-breadcrumb"> <?=get_category(9)?> <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
<?php
print <<<EOT
  <table class="table table-border table-bordered table-bg">
  
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">服务器端信息： </td> 
    <td width="28%" height="22" align="left">$systemMsg[SERVER_SOFTWARE]</td>
    <td width="16%" align="right">邮件支持模式：</td>
    <td width="27%" height="22" align="left"> $systemMsg[sys_mail]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">PHP程式版本： </td> 
    <td width="28%" height="22" align="left">$systemMsg[sysversion]</td>
    <td width="16%" align="right">服务器IP：</td>
    <td width="27%" height="22" align="left"> $systemMsg[SERVER_ADDR]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">MYSQL 版本： </td> 
    <td width="28%" height="22" align="left">$systemMsg[mysqlVersion]</td>
    <td width="16%" align="right">服务器端口:</td>
    <td width="27%" height="22" align="left"> $systemMsg[SERVER_PORT]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">最大上传限制： </td> 
    <td width="28%" height="22" align="left">$systemMsg[max_upload]</td>
    <td width="16%" align="right">服务器所在时间：</td>
    <td width="27%" height="22" align="left"> $systemMsg[systemtime]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">最大执行时间： </td> 
    <td width="28%" height="22" align="left">$systemMsg[max_ex_time]</td>
    <td width="16%" align="right">网站所在磁盘物理位置：</td>
    <td width="27%" height="22" align="left"> $systemMsg[DOCUMENT_ROOT]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">是否允许打开远程文件(采集数据): </td> 
    <td width="28%" height="22" align="left">$systemMsg[allow_url_fopen]</td>
    <td width="16%" align="right">当前文件: </td>
    <td width="27%" height="22" align="left">$systemMsg[SCRIPT_FILENAME]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">图像GD支持与否:</td> 
    <td width="28%" height="22" align="left"> $systemMsg[gdpic]</td>
    <td width="16%" align="right">你的IP：</td>
    <td width="27%" height="22" align="left"> $systemMsg[onlineip]</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="29%" align="right">Zend Optimizer版本(PHP加密解释器):</td> 
    <td width="28%" height="22" align="left">$systemMsg[zendVersion]</td>
    <td width="16%" align="right">当前域名： </td>
    <td width="27%" height="22" align="left">$systemMsg[SERVER_NAME]</td>
  </tr>
</table>
EOT;
?>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="layer/layer.min.js"></script> 
<script type="text/javascript" src="js/pagenav.cn.js"></script> 
<script type="text/javascript" src="plugin/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 

</body>
</html>